<template>
  <div>
    <!-- 头部标题组件 -->
    <headerTitle>{{ msg }}</headerTitle>
    <div class="login">
      <button @click="$router.push({ path: '/login' })">登录/注册</button>
    </div>
    <div class="mycontrole">
      <div>
        <p>0</p>
        <p>收藏的商品</p>
      </div>
      <div>
        <p>0</p>
        <p>关注的店铺</p>
      </div>
      <div>
        <p>0</p>
        <p>我的足迹</p>
      </div>
    </div>
    <div class="mylists" @click="$router.push({path:'/pay'})">
      <div>
        <img src="../assets/images/my_list.png" alt="" />
        <span>我的订单</span>
      </div>
      <div class="allBuy">
        查看全部购买商品
        <i class="iconfont icon-youjiantou"></i>
      </div>
    </div>
    <div class="my_goods">
      <div @click="$router.push({path:'/pay',query:{active:1}})">
        <img
          src="http://img60.ddimg.cn/upload_img/00487/11111/fukuan-07.png"
          alt=""
        />
        <p>待付款</p>
      </div>
      <div @click="$router.push({path:'/pay',query:{active:3}})">
        <img
          src="http://img63.ddimg.cn/upload_img/00487/11111/shouhuo-07.png"
          alt=""
        />
        <p>待收货</p>
      </div>
      <div>
        <img
          src="http://img61.ddimg.cn/upload_img/00555/touch/pd-return.png"
          alt=""
        />
        <p>退换货</p>
      </div>
    </div>

    <div class="oderControle">
      <router-link tag="div" to="/login">
        <img src="../assets/images/lijuan.png" alt="" />
        <p>我的礼卷</p>
        <i class="iconfont icon-youjiantou"></i>
      </router-link>
      <router-link tag="div" to="/login">
        <img src="../assets/images/jifen.png" alt="" />
        <p>积分抵现</p>
        <i class="iconfont icon-youjiantou"></i>
      </router-link>
      <router-link tag="div" to="/login">
        <img src="../assets/images/danzibook.png" alt="" />
        <p>我的电子书</p>
        <i class="iconfont icon-youjiantou"></i>
      </router-link>
      <router-link tag="div" to="/login">
        <img src="../assets/images/lipinka.png" alt="" />
        <p>我的礼品卡</p>
        <i class="iconfont icon-youjiantou"></i>
      </router-link>
      <router-link tag="div" to="/address">
        <img src="../assets/images/shouhuodizhi.png" alt="" />
        <p>收货地址</p>
        <i class="iconfont icon-youjiantou"></i>
      </router-link>
    </div>
    <div class="kefu">
      <img src="../assets/images/kefu.png" alt="" />
      <p>客服反馈</p>
    </div>

    <!-- 商品推荐 -->
    <!-- <div class="introduce">
            <div class="title">
                <p>商品推荐</p>
            </div>
            <div class="goods">
                <div class="item">
                    <img src="../assets/images/b1.jpg" alt="">
                    <p>描述</p>
                </div>
                <div class="item">
                    <img src="../assets/images/b1.jpg" alt="">
                    <p>描述</p>
                </div>
            </div>
        </div> -->
    <!-- 猜你喜欢 组件 -->
    <guessLike />
  </div>
</template>

<script>
import guessLike from "../components/base/guessLike.vue";
import headerTitle from "../components/base/headerTitle.vue";
export default {
  components: {
    guessLike,
    headerTitle,
  },
  data() {
    return {
      msg: "我的当当",
    };
  },
  mounted() {
    window.addEventListener("beforeunload", window.scroll(0, 0));
  },
};
</script>

<style lang="less">
.my_title {
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  padding: 0px 15px;
}
.login {
  width: 100%;
  height: 115px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url(../assets/images/my_bcc.jpg);
  background-size: cover;
  button {
    display: inline-block;
    width: 120px;
    height: 40px;
    border: 1px solid #fff;
    border-radius: 20px;
    font-size: 20px;
    // padding: 5px 10px;
    color: white;
    background-color: #130e0b;
  }
}
.mycontrole {
  display: flex;
  background-color: #fff;
  margin-bottom: 5px;
  div {
    flex: 0 0 33.3%;
    text-align: center;
    padding: 10px 0px;
  }
}
.mylists {
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  margin-bottom: 10px;
  div {
    display: flex;
    align-content: center;
    img {
      width: 25px;
      display: inline-block;
      margin: 0px 10px;
    }
    &.allBuy {
      color: gray;
      line-height: 40px;
      i {
        margin: 0px 10px;
      }
    }
  }
}
.my_goods {
  display: flex;
  background-color: #fff;
  margin-bottom: 10px;
  div {
    flex: 0 0 33.3%;
    text-align: center;
    // padding: 10px 0px;
    padding-bottom: 5px;
    font-size: 12px;
    img {
      width: 25px;
      margin: 5px auto 2px;
    }
  }
}
.oderControle {
  div {
    background-color: #fff;
    display: flex;
    align-items: center;
    position: relative;
    height: 40px;
    margin-bottom: 2px;
    img {
      width: 30px;
      margin: 0px 10px;
    }
    i {
      position: absolute;
      right: 10px;
    }
  }
}
.kefu {
  margin-top: 20px;
  display: flex;
  align-items: center;
  background-color: #fff;
  height: 40px;
  margin-bottom: 20px;
  img {
    width: 30px;
    margin: 0px 10px;
  }
}
.introduce {
  padding-bottom: 100px;
  .title {
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #fff;
    margin-bottom: 10px;
  }
  .goods {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 10px;
    .item {
      border-radius: 20px;
      background-color: #fff;
      padding: 10px;
      width: 48%;
      text-align: center;
      margin-bottom: 5px;
      box-sizing: border-box;
      img {
        margin: 0 auto;
        width: 50%;
        margin-bottom: 5px;
      }
    }
  }
}
</style>